package tools;

import java.util.Random;

public class RandomArray {
    public static int[] generateRandomArray(int maxSize, int maxValue){
        Random rand = new Random();
        int size = rand.nextInt(maxSize + 1);
        int[] array = new int[size];
        for(int i =0; i < size; i++){
            array[i] = rand.nextInt(2* maxValue + 1) - maxValue; // Generate random values between -maxValue and maxValue (inclusive
        }
        return array;
    }
}
